<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('service_orders', function (Blueprint $table) {
			$table->id();
			$table->string('order_sn')->comment('订单编码');
			$table->string('out_order_id')->comment('外部订单编码');
			$table->string('order_service')->comment('订单服务商，piaochi等');
			$table->timestamps();
			$table->index('order_sn','idx_order_sn');
			$table->index('out_order_id','idx_out_order');
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::dropIfExists('service_orders');
	}
};
